package com.ror.java.se.string;

// Java 8
// -Xmx10m -XX:+PrintStringTableStatistics -XX:+PrintGCDetails -verbose:gc
public class Demo03StringTable {
    public static void main(String[] args) throws InterruptedException {
        int i = 0;
        try {
            for (i = 0; i < 10000; i++) {
                String.valueOf(i).intern();
            }
        } catch (Throwable e) {
            e.printStackTrace();
        } finally {
            System.out.println(i);
        }
    }
}
